Chapter 7 Routing

According to text, routing is the piece that makes TCP/IP as popular as it is.

What is routing?

Routing is the process of moving a packet of information from one network to another based on known information. Routing takes place on all IP - enabled equipment.

What is router?

A router is a physical link between two networks. This link sits there passively until it receives a packet from a host on either network.  Routers are passive, meaning they do not actively seek packets that have to be moved to the other network, instead the packet is sent to the router.

A device that connects any number of LANs.  Routers use headers and a forwarding table to determine where packets go, and they use ICMP to communicate with each other and configure the best route between any two hosts.  Very little filtering of data is done through routers. Routers do not care about the type of data they handle. (webopedia reference)

What is bridge?

A bridge listens to all the traffic on the networks it is connected to, finding out which systems (MAC addresses) are on each side. It can then move data bound for a particular MAC address to the network on which that address resides.

A device that connects two local-area networks (LANs), or two segments of the same LAN. The two LANs being connected can be alike or dissimilar. For example, a bridge can connect an Ethernet with a Token-Ring network.  Unlike routers, bridges are protocol -independent. They simply forward packets without analyzing and re-routing messages. Consequently, they're faster than routers, but also less versatile.  (webopedia reference)

Bridges and switches are a data communications devices that operate principally at Layer 2 of the OSI reference model. As such, they are widely referred to as data-link layer devices.

Bridges became commercially available in the early 1980s. At the time of their introduction, bridges connected and enabled packet forwarding between homogeneous networks. More recently, bridging between different networks also has been defined and standardized.

Several kinds of bridging have proven important as internetworking devices.  Transparent bridging is found primarily in Ethernet environments, while source-route bridging occurs primarily in Token Ring environments. Translational bridging provides translation between the formats and transit principles of different media types (usually Ethernet and Token Ring). Finally, source-route transparent bridging combines the algorithms of transparent bridging and source-route bridging to enable communication in mixed Ethernet/Token Ring environments.

Today, switching technology has emerged as the evolutionary heir to bridging-based internetworking solutions. Switching implementations now dominate applications in which bridging technologies were implemented in prior network designs. Superior throughput performance, higher port density, lower per-port cost, and greater flexibility have contributed to the emergence of switches as replacement technology for bridges and as complements to routing technology.  (cisco website)

What is brouter?

Short for bridge router, and pronounced brau-ter, a device that functions as both a router and a bridge. A brouter understands how to route specific types of packets, such as TCP/IP packets. Any other packets it receives are simply forwarded to other network(s) connected to the device (this is the bridge function).


IP Routing

An IP router (gateway) is a device that has more than one NIC and connected to multiple subnets. Routers can pass packets between the subnets allowing them to act as a contiguous network. Routers can be either dedicated hardware devices or software services on hosts. For the Microsoft TCP/IP exam the term gateway is usually referencing a router.

Multihomed Computer is a NT computer that has multiple NICs and attaches to two or more subnets.


A router and bridge both have a physical network interface (NIC) on both networks with which it connects. Routers also have the IP layer built into them.  Why, because it is the IP layer that enables the router to route the packets from one network to another.

Routing is a function of the IP layer of the TCP/IP protocol stack.  The IP layer uses routing tables to figure out where the packet should be sent next.

IP datagram contain the source and destination addresses for the packet being sent.

ANDing is also a function that takes place at the IP layer.

Routing Table allows a router to route the packets.  A routing table is basically a list of all the networks that the router knows about.

ROUTE command is used to modify or view the routing information in an NT system (Chapter 5)

A route table includes the following:

Default Gateway every NT client has a default gateway address defined in the IP Address tab of TCP/IP properties dialog. There is an Advance button also here which allows a list of gateways to be listed in order of priority. The default gateway is listed in the route table with a network address of 0.0.0.0. The defined gateways are used in order when no explicit route is found in the route table for a destination address.


Static vs Dynamic Routing

There are two types of routing with NT: static and dynamic. 

Static router knows only the networks that you tell it about or that it is physically connected to. To route, you must build the entire routing table and maintain it. If a route changes, you must manually enter it into routing tables. Route tables are not networked between routers, this is why the route table must be specified for each multihomed computer.

Dynamic router uses routing protocols to enable routers to share information about the networks they are aware of.  So, if a route changes, by the use of routing protocols, the routing table is dynamically updated.


Using NT as a Router

(Static)

  1. Install two or more NICs into a single computer.
  2. Assign an IP address to each of the two cards that is valid for the network it is to attach to
  3. Once NICs are in and functioning, then Enable IP Forwarding by checking box on Routing Tab.

These 3 steps make your NT system a Static router. Let's look at page 116, figure 7.1 and Table 7.1

In figure 7.1, you've got two subnets that are connecting by using NT system as a router. The routing table for the NT system automatically has a reference to both networks, and can route between them. The NT router know about both Networks. Therefore, it will automatically have a static route from one to the other. 

Entries for one router, two networks would look like this: 

Network ID Subnet Mask Gateway
160.16.5.0 255.255.255.0 160.16.5.1
160.16.9.0 255.255.255.0 160.16.9.1

All the host on the 5.0 subnet will use 5.1 as the default gateway, while the hosts on 9.0 subnet will use 9.1 as their default gateway.

This is how it works:

A host on the 160.16.5.0 network the packet goes to the router (NT system with 2 NICs). The router looks at the destination IP address and finds the route does exist and the packets from 5.0 network send it to the gateway 160.16.9.1 (router) of the 9.0 network.

If it could only be that simple.

What happens if if you add a third network?


Let's look at Figure 7.2 on page 117. 

Network 160.16.5.0 (A) knows that network 160.16.9.0 (B) exists because of above scenario.  However, when you add the third network 208.23.25.0 (C), network C know that network B exist but isn't aware that network A exist and vice versa.  Because network A doesn't know that network C exist, they cannot communicate. This issue can be resolved in two ways.

Solution 1:

The network ID of 0.0.0.0 with a subnet of 0.0.0.0 is going to catch every possible IP address. This entry is the default gateway. The default gateway is basically used as a place to send packets for unknown networks.  Well routers also have a default gateway so that they can forward packets on to more powerful and knowledgeable routers.

What you are saying is if the first router doesn't know about the address you are trying to contact, the second router should. The two routers combined should know every network that exists. You tell the first router if there's a network address you don't know about, the packet should be sent to the second router and so on.

The problem is solved after each router becomes the other's default gateway, communication is established. Keeping in mind, anyone router going down breaks the chain.

The routing table for the A, B, C networks would look like this (page 118, Table 7.2)

Network ID Subnet Mask Gateway
160.16.5.0 255.255.255.0 160.16.5.1
160.16.9.0 255.255.255.0 160.16.9.1
0.0.0.0 0.0.0.0 160.16.9.2

 

Solution 2:

Another way to solve the problem is to add a static route to each router to tell it how to get to the other networks which it needs to communicate. This is done by using the Route command.

On the first router, you add a route to Network C 208.23.25.0 and on the second router you add 160.16.5.0.

These commands look like this:

COMMAND AT THE FIRST ROUTER

ROUTE -P ADD 208.23.25.0 Mask 255.255.255.0 160.16.9.2

COMMAND AT THE SECOND ROUTER

ROUTE -P ADD 160.16.5.0 Mask 255.255.255.0 160.16.9.1

This is what the routing table would like like on 1st router

Network ID Subnet Mask Gateway
160.16.5.0 255.255.255.0 160.16.5.1
160.16.9.0 255.255.255.0 160.16.9.1
208.23.25.0 255.255.255.0 160.16.9.2

This is what the routing table would like like on 2nd router

Network ID Subnet Mask Gateway
208.23.25.0 255.255.255.0 160.16.9.2
160.16.9.0 255.255.255.0 160.16.9.1
160.16.5.0 255.255.255.0 160.16.5.1

(Dynamic Routing)

A dynamic router is a router that has some method of sharing its routing information with the other routers on the network.

Routing Protocols are OSPF (Open Shortest Path First) and RIP (Routing Information Protocol). Of these two, NT only supports RIP Routing.

OSPF

Open Shortest Path First

OSPF is a link state routing protocol, meaning that routing is based not only on distance but on the current status of links in the network. It is an autonomous system, meaning that all routers use the same algorithm and a copy of the same database. Each OSPF router maintains a database that keeps track of the entire routing system, and receives updates from other routers. It uses less network traffic than RIP because OSPF routers only transmit changes to the routing table rather than periodically broadcasting the entire table. Windows NT 4.0 does not support OSPF.

RIP Routing

Router Information Protocol

The support for dynamic routing came in the form of Routing Information Protocol (RIP). RIP is a distance vector routing protocol. It is concerned not only with finding a method for moving the information from Point A to Point B, but also with the costs (Number of hops) involved in connecting with the remote host. This information is used to calculate the best route to the destination host. The routing metric keeps cost information.

How RIP works

RIP is a very simple protocol, every 30 seconds, the router broadcasts its routing tables to the network. Ok, so this seems like a lot of overhead. Actually, the maximum metric that a router can keep a route is for 15 (the router only keeps the address of the remote network and the next router to which it forwards the datagrams to reach that network.

As a router broadcasts its routing table to the local networks its connected to, the other routers take that information and enters it into their own routing tables (adding 1 to the metric to represent the hop to the router that made the broadcast).

What gets added to routing tables is the network for which there is a route and addresses of the router that broadcasted the information. The router that receives the information, now, broadcasts everything it knows to the networks to which it is connected, and so on. This makes it possible to propagate the routing information to many different routers on an intranet or on the Internet.

This dynamic method means, all the routers on the network will eventually know about all the networks that are 16 or less hops away.

This process of information sharing is known as convergence.

Rip keeps an internal routing table similar to the table used for static routing, but the table is maintained strictly by receiving updates from adjacent routers

The following information is maintained for each entry in the RIP database:

Cons of RIP

Table size (could get rather large) The basis of RIP is that every router knows what its neighbor knows and what that neighbor knows and so on until you reach a metric of 16 (16 networks).  Table size is currently addressed by RAM to the routers to increase the size of list that they are able to keep.

Broadcast traffic RIP relies on broadcast traffic. This extra overhead can cause network load problems.

Dead routers Entries in the routing tables are based on the next router and the one after that and the one after that and so on. Even though a route entry has a timeout value of 3 minutes, there can be significant amount of time before the route clears entries from routers that are 5 or 6 or 16 networks away.

Installing RIP

To install RIP on your NT System use the following steps

Prior to Installation:

  1. Make sure there are 2 functioning NICs in computer and that IP Forwarding is enabled
  2. Open Network dialog box

 

  1. Select the Services tab, and choose Add
  2. Select RIP for TCP/IP networks, and then click OK
  3. Close the Network dialog box
  4. Restart the system